import instance from "@/utils/request";

export function list(page, size, resource) {
  return instance({
    method: "post",
    url: `/resource/list/${page}/${size}`,
    data: resource
  });
}

export function add(resource) {
  return instance({
    method: "post",
    url: `/resource/add`,
    data: resource
  });
}

export function getOne(id) {
  return instance({
    method: "get",
    url: `/resource/${id}`
  });
}

export function del(id) {
  return instance({
    method: "delete",
    url: `/resource/${id}`
  });
}
